import {
  ChartPieOne,
  CollectionRecords,
  DocumentFolder,
  MoreTwo,
} from "@icon-park/react";
import createTwoWayMap from "../util/createTwoWayMap";
import {type RouteType,type RouteItemState} from '../type/route'
const RouteArr: RouteType[] = ["主页", "收藏", "统计", "设置"];
const RouteIconElememt = [
  <DocumentFolder theme="outline" size="28" fill="rgb(231, 241, 249)" strokeWidth={3} />,
  <CollectionRecords theme="outline" size="28" fill="rgb(231, 241, 249)" strokeWidth={3} />,
  <ChartPieOne theme="outline" size="28" fill="rgb(231, 241, 249)" strokeWidth={3} />,
  <MoreTwo theme="outline" size="28" fill="rgb(231, 241, 249)" strokeWidth={3} />,
];
const RouteItemStateArr = RouteArr.map<RouteItemState>((v, i) => {
  return {
    iconName: v,
    iconElement: RouteIconElememt[i],
  };
});
const RouteItemMap = createTwoWayMap(RouteArr,['main','favourite','info','setting'])
export { RouteArr,RouteItemStateArr,RouteItemMap};
